package cn.jdy.plugins.entity;

import cn.jdy.common.bo.BaseEntry;
import cn.jdy.framework.db.hibernate.Validator;
import cn.jdy.platform.entity.ConfValue;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import java.io.Serializable;

/**
 * 企业信息展示内容
 *
 * @author guoxp
 * @date 2014年5月31日 下午4:44:24
 * @package cn.jdy.plugins.entity
 * @project sjww-server
 */
@Entity
public class CompanyContext extends BaseEntry implements Serializable {

	private static final long serialVersionUID = 7574501781612883400L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Integer id;// 主键
	@Column(nullable = false, updatable = false)
	private Integer companyId;// 企业ID
	@Validator
	@Column(columnDefinition = "longtext")
	private String homePageContext; // 企业介绍
	@Validator
	@Column(columnDefinition = "longtext")
	private String brandIntroduction; // 产品展示
	@Validator
	@Column(columnDefinition = "longtext")
	private String investmentPolicy; // 招聘信息
	@Validator
	@Column(columnDefinition = "longtext")
	private String contentus; // 联系我们
	@Validator
	private int state;		//0 待审核	 1审核通过 	2审核不通过   9 预览/暂存
	@Validator
	private String brandName; // 品牌名称
	@Validator
	private String companyLogo; // 企业logo
	@Validator
	private String brandLogo; // 品牌logo
	@Column(updatable = false)
	private String createDate; // 申请时间
	@Validator
	private String advice;//审核意见
	@Validator
	@Column(length = 20)
	private String classId;    //分类

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "classId", insertable = false, updatable = false)
	private ConfValue bClass;
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "companyId", insertable = false, updatable = false)
	private Company company;

	public Company getCompany() {
		return company;
	}

	public void setCompany(Company company) {
		this.company = company;
	}

	public String getClassId() {
		return classId;
	}

	public void setClassId(String classId) {
		this.classId = classId;
	}

	public ConfValue getbClass() {
		return bClass;
	}

	public void setbClass(ConfValue bClass) {
		this.bClass = bClass;
	}

	//getter and setter
	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Integer companyId) {
		this.companyId = companyId;
	}

	public String getContentus() {
    return contentus;
  }

  public void setContentus(String contentus) {
    this.contentus = contentus;
  }

  public String getHomePageContext() {
		return homePageContext;
	}

	public void setHomePageContext(String homePageContext) {
		this.homePageContext = homePageContext;
	}

	public String getBrandIntroduction() {
		return brandIntroduction;
	}

	public void setBrandIntroduction(String brandIntroduction) {
		this.brandIntroduction = brandIntroduction;
	}

	public String getInvestmentPolicy() {
		return investmentPolicy;
	}

	public void setInvestmentPolicy(String investmentPolicy) {
		this.investmentPolicy = investmentPolicy;
	}

	public String getBrandName() {
		return brandName;
	}

	public void setBrandName(String brandName) {
		this.brandName = brandName;
	}

	public String getCompanyLogo() {
		return companyLogo;
	}

	public void setCompanyLogo(String companyLogo) {
		this.companyLogo = companyLogo;
	}

	public String getBrandLogo() {
		return brandLogo;
	}

	public void setBrandLogo(String brandLogo) {
		this.brandLogo = brandLogo;
	}

	public String getCreateDate() {
		return createDate;
	}

	public void setCreateDate(String createDate) {
		this.createDate = createDate;
	}

	public String getAdvice() {
		return advice;
	}

	public void setAdvice(String advice) {
		this.advice = advice;
	}

}
